function CheckAll(num) {
    var allBox = document.getElementsByName('CopyAddr' + num + '');
    var checked = document.getElementById('allcheck' + num + '').checked;
    for (var k = 0; k < allBox.length; k++) {
        allBox[k].checked = checked;
    }
}
function CopyToClip(num) {
    var addrStr, allBox;
    addrStr = '';
    allBox = document.getElementsByName('CopyAddr' + num + '');
    for (var k = 0; k < allBox.length; k++){
        addrStr += allBox[k].checked == true ? (addrStr == '' ? allBox[k].value : '\n' + allBox[k].value) : '';
    }

    if (window.clipboardData && clipboardData.setData) {
        clipboardData.setData("Text", addrStr);
        alert('已经全部复制到粘贴板');
    }
    else {
        alert('您的浏览器出于安全阻止了复制到到剪贴板');
    }
}


